ESRI Python Add-in
Introduction
For ArcMap (ArcGIS Desktop), the ESRI Python Add-In may be used as the interface between ArcMap and Assetic. It utilises the 'assetic_esri' python SDK.
NOTE The assetic_esri python SDK is required by this add-in. Please install this first, as described in the article ESRI-Integration-Introduction in the section Installation of assetic_esri package
This is the default plugin developed by Assetic
Alternatively create your own using the ESRI Python add-in wizard.
You may also modify the default plug-in created by Assetic as described in the section Customising the Assetic addin below.
The following information is for using the default plugin developed by Assetic.
NOTE Support for Functional Location was introduced in version 3.1 of the add-in and requires the assetic_esri package 1.1.1.0 or greater
Install Add-in
An ESRI add-in is installed from a file with the extension ".esriaddin", for example, the default add-in provided by Assetic is "assetic.esriaddin".
It is assumed the assetic_esri python SDK has already been installed.
To install the add-in:
- Ensure ArcMap is closed
- Double click on the file "assetic.esriaddin"
- An installation utility will pop up as shown below
- Click on the “Install Add-In” button
- The Add-In will install. Once installed the following message box appears to indicate the installation is complete. Click on the OK button to finish
Enable Extensions
After installing the add-in a new toolbar will appear when ArcMap is started. The add-in is almost ready for use, but there is one more step. The 'add-in' needs to be 'enabled' as an 'extension'.
- From the ArcMap, menu Customise choose Extensions.
- The window shown below will appear.
- "Extensions" Window
- Enable “Assetic Integration” by ticking the checkbox next to “Assetic Integration”, and then click on the “Close” button.
- Restart ArcMap and the Add-In will be ready for use.
Using the Assetic Add-In
Create Asset
- Create the new feature(s) in ArcMap and assign attributes
- Select one or more features that require a corresponding asset in Assetic
- Click on the “Create Asset” button in the Assetic toolbar
- You will be prompted to confirm you want to create assets for each layer that has features currently selected. In the example below there are features selected in the layer “SealedRoads”
- Choose ‘Yes’ to continue with creating assets in Assetic, or ‘No’ to skip asset creation for that layer.
- A progress dialogue will appear showing that the asset creation is taking place in Assetic
- Once the asset(s) have been created a report displays how many assets were created, and how many were skipped or had errors.
- Asset creation is skipped if the Assetic GUID field for the feature is not empty since this implies the asset already exists in Assetic
- If there are errors they will be recorded in the error log or output to the ArcMap Python window.
Show in Assetic
To view the asset in Assetic use the “Show In Assetic” button.
- Select the feature
- Click on the “Show in Assetic” button in the Add-In menu
- Assetic will open in the default browser, and always in a new tab window.
Updating Assetic asset attributes and spatial.
You may optionally choose to edit attributes in ArcMap and update Assetic with the new attribute values. The integration configuration allows you to optionally update the spatial representation of the asset held in Assetic.
- Select one or more features and edit attributes
- Click on the “Update Asset” button (highlighted)
- You will be prompted to confirm that you want to update the attributes of the selected assets
- Choose “Yes” to continue, or “No” to skip updates
- A progress dialogue will pop up showing that the update process is in progress (like the dialog for ‘Create Assets’)
- Upon completion, a message dialogue will pop up indicating the number of features successfully processes, or the number of errors if there were any errors.
- Commit the edits in ArcMap.
Create Functional Location
- Create the new feature(s) in ArcMap and assign attributes
- Select one or more features that require a corresponding Functional Location in Assetic
- Click on the “Create Functional Location” button in the Assetic toolbar
- You will be prompted to confirm you want to create Functional Locations for each layer that has features currently selected. In the example below there are features selected in the layer “local_govt_reserve”
- Choose ‘Yes’ to continue with creating Functional Locations in Assetic, or ‘No’ to skip Functional Location creation for that layer.
- A progress dialogue will appear showing that the Functional Location creation is taking place in Assetic
- Once the Functional Location(s) have been created a report displays how many Functional Locations were created, and how many were skipped or had errors.
- Functional Location creation is skipped if the Assetic GUID field for the feature is not empty since this implies the asset already exists in Assetic
- If there are errors they will be recorded in the error log or output to the ArcMap Python window.
- Commit the edits in ArcMap
Updating Assetic Functional Location attributes.
You may optionally choose to edit attributes in ArcMap and update the Assetic Functional Location with the new attribute values.
- Select one or more features and edit attributes
- Click on the “Update Functional Location” button (highlighted)
- You will be prompted to confirm that you want to update the attributes of the selected Functional Locations
- Choose “Yes” to continue, or “No” to skip updates
- A progress dialogue will pop up showing that the update process is in progress (like the dialog for ‘Create Assets’)
- Upon completion, a message dialogue will pop up indicating the number of features successfully processes, or the number of errors if there were any errors.
- Commit the edits in ArcMap.
Customising the Assetic add-in
The file assetic.esriaddin can be renamed as assetic.zip, and the contents extracted to a new folder. The ESRI Python add-in wizard can then be used to modify the add-in, or you may choose to manually edit the add-in.
When you extract the contents of the zip file the following folder structure should be present
The 'Install' folder contains a python script "assetic_addin.py". This script should be edited to change the behaviour of the add-in.
The python script makeaddin.py is used to rebuild the add-in
For more information about ESRI add-ins refer to the ESRI documentation creating-an-add-in-button.htm.